from Page.page_gps import PageGps
from Page.page_app import PageApp
from Page.page_login import PageLogin
from Page.page_device import PageDevice
from Page.page_upgrade import PageUpgrade

"""Page类做为统一入口类，可调用所有页面page对象"""


class Page:
    def __init__(self, driver):
        self.driver = driver

    # 返回page_login对象
    @property
    def login(self):
        return PageLogin(self.driver)

    # 返回page_gps对象
    @property
    def gps(self):
        return PageGps(self.driver)

    # 返回page_app对象
    @property
    def app(self):
        return PageApp(self.driver)

    # 返回page_devices对象
    @property
    def device(self):
        return PageDevice(self.driver)

    # 返回page_upgrade对象
    @property
    def upgrade(self):
        return PageUpgrade(self.driver)

